/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package br.unioeste.cc.gui;

import br.unioeste.cc.vm.*;
import java.io.File;
import java.util.ArrayList;
import javax.swing.JFileChooser;
import javax.swing.JOptionPane;

/**
 *
 * @author diego
 */
public class VirtualMachineGUI extends javax.swing.JFrame {

    public VirtualMachineGUI() {
        initComponents();
    }

    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jTabbedPaneInfo = new javax.swing.JTabbedPane();
        jPanelViaDados = new javax.swing.JPanel();
        panelImagemFundo1 = new br.unioeste.cc.gui.PanelImagemFundo();
        lbAdder = new javax.swing.JLabel();
        lbFunct = new javax.swing.JLabel();
        lbInstruction = new javax.swing.JLabel();
        lbWriteReg = new javax.swing.JLabel();
        lbRt = new javax.swing.JLabel();
        lbRd = new javax.swing.JLabel();
        lbIncPc = new javax.swing.JLabel();
        lbPcSrc = new javax.swing.JLabel();
        lbRs = new javax.swing.JLabel();
        lbWriteData = new javax.swing.JLabel();
        lbOpcode = new javax.swing.JLabel();
        lbPc = new javax.swing.JLabel();
        lbResult = new javax.swing.JLabel();
        lbSignalAluSrc = new javax.swing.JLabel();
        lbSignalBranch = new javax.swing.JLabel();
        lbSignalAluControl = new javax.swing.JLabel();
        lbSignalAluOp = new javax.swing.JLabel();
        lbSignalRegWrite = new javax.swing.JLabel();
        lbSignalMemToReg = new javax.swing.JLabel();
        lbSignalRegDst = new javax.swing.JLabel();
        lbSignalMemRead = new javax.swing.JLabel();
        lbSignalMemWrite = new javax.swing.JLabel();
        lbZero = new javax.swing.JLabel();
        lbSinalAndbneorAndBranch = new javax.swing.JLabel();
        lbSinalJump = new javax.swing.JLabel();
        lbSinalBne = new javax.swing.JLabel();
        lbSinalZero = new javax.swing.JLabel();
        lbSignalLui = new javax.swing.JLabel();
        lbSinalBneAndZero = new javax.swing.JLabel();
        lbSinalJumpjr = new javax.swing.JLabel();
        jPanelInfo = new javax.swing.JPanel();
        jPanelRegister = new javax.swing.JPanel();
        jScrollPaneRegister = new javax.swing.JScrollPane();
        jTableRegister = new javax.swing.JTable();
        jPanelInst = new javax.swing.JPanel();
        jScrollPaneInst = new javax.swing.JScrollPane();
        jTableInst = new javax.swing.JTable();
        jPanelTypeInst = new javax.swing.JPanel();
        jPanelFormatR = new javax.swing.JPanel();
        jLabel4 = new javax.swing.JLabel();
        jLabel5 = new javax.swing.JLabel();
        jLabel6 = new javax.swing.JLabel();
        jLabel7 = new javax.swing.JLabel();
        jLabel8 = new javax.swing.JLabel();
        jTextFieldOpcodeR = new javax.swing.JTextField();
        jTextFieldRsR = new javax.swing.JTextField();
        jTextFieldRtR = new javax.swing.JTextField();
        jTextFieldRdR = new javax.swing.JTextField();
        jTextFieldShamt = new javax.swing.JTextField();
        jTextFieldFunct = new javax.swing.JTextField();
        jSeparator6 = new javax.swing.JSeparator();
        jSeparator9 = new javax.swing.JSeparator();
        jSeparator15 = new javax.swing.JSeparator();
        jSeparator16 = new javax.swing.JSeparator();
        jSeparator17 = new javax.swing.JSeparator();
        jLabel24 = new javax.swing.JLabel();
        jPanelFormatI = new javax.swing.JPanel();
        jLabel3 = new javax.swing.JLabel();
        jTextFieldOpcodeI = new javax.swing.JTextField();
        jTextFieldRsI = new javax.swing.JTextField();
        jTextFieldRtI = new javax.swing.JTextField();
        jTextFieldAddressI = new javax.swing.JTextField();
        jLabel9 = new javax.swing.JLabel();
        jLabel10 = new javax.swing.JLabel();
        jLabel11 = new javax.swing.JLabel();
        jSeparator2 = new javax.swing.JSeparator();
        jSeparator5 = new javax.swing.JSeparator();
        jSeparator7 = new javax.swing.JSeparator();
        jSeparator8 = new javax.swing.JSeparator();
        jPanelFormatJ = new javax.swing.JPanel();
        jSeparator4 = new javax.swing.JSeparator();
        jTextFieldOpcodeJ = new javax.swing.JTextField();
        jTextFieldAddressJ = new javax.swing.JTextField();
        jLabel2 = new javax.swing.JLabel();
        jLabel1 = new javax.swing.JLabel();
        jPanelSignalControl = new javax.swing.JPanel();
        jLabel25 = new javax.swing.JLabel();
        jLabel26 = new javax.swing.JLabel();
        jLabel27 = new javax.swing.JLabel();
        jLabel28 = new javax.swing.JLabel();
        jLabel29 = new javax.swing.JLabel();
        jLabel30 = new javax.swing.JLabel();
        jLabel31 = new javax.swing.JLabel();
        jLabel32 = new javax.swing.JLabel();
        jLabel33 = new javax.swing.JLabel();
        jLabel34 = new javax.swing.JLabel();
        jLabel35 = new javax.swing.JLabel();
        jLabelBranch = new javax.swing.JLabel();
        jLabelRegDst = new javax.swing.JLabel();
        jLabelMemToReg = new javax.swing.JLabel();
        jLabelMemRead = new javax.swing.JLabel();
        jLabelAluOp = new javax.swing.JLabel();
        jLabelMemWrite = new javax.swing.JLabel();
        jLabelAluSrc = new javax.swing.JLabel();
        jLabelAluControl = new javax.swing.JLabel();
        jLabelRegWrite = new javax.swing.JLabel();
        jLabelZero = new javax.swing.JLabel();
        jLabelPcSrc = new javax.swing.JLabel();
        jPanelReg = new javax.swing.JPanel();
        jLabel12 = new javax.swing.JLabel();
        jLabel13 = new javax.swing.JLabel();
        jLabel14 = new javax.swing.JLabel();
        jLabel15 = new javax.swing.JLabel();
        jLabel16 = new javax.swing.JLabel();
        jLabel17 = new javax.swing.JLabel();
        jLabelReadReg1 = new javax.swing.JLabel();
        jLabelReadReg2 = new javax.swing.JLabel();
        jLabelReadData1 = new javax.swing.JLabel();
        jLabelReadData2 = new javax.swing.JLabel();
        jLabelWriteReg = new javax.swing.JLabel();
        jLabelWriteData = new javax.swing.JLabel();
        jPanelMemoryRead = new javax.swing.JPanel();
        jLabel18 = new javax.swing.JLabel();
        jLabel19 = new javax.swing.JLabel();
        jLabel20 = new javax.swing.JLabel();
        jLabelAdress = new javax.swing.JLabel();
        jLabelWriteDataMD = new javax.swing.JLabel();
        jLabelReadData = new javax.swing.JLabel();
        jPanelAlu = new javax.swing.JPanel();
        jLabel36 = new javax.swing.JLabel();
        jLabel38 = new javax.swing.JLabel();
        jLabel39 = new javax.swing.JLabel();
        jLabel40 = new javax.swing.JLabel();
        jLabelOp1 = new javax.swing.JLabel();
        jLabelOp2 = new javax.swing.JLabel();
        jLabelOperation = new javax.swing.JLabel();
        jLabelAluResult = new javax.swing.JLabel();
        jPanel1 = new javax.swing.JPanel();
        jLabel21 = new javax.swing.JLabel();
        jLabelPc = new javax.swing.JLabel();
        jToolBar1 = new javax.swing.JToolBar();
        lbOpen = new javax.swing.JLabel();
        jSeparator1 = new javax.swing.JToolBar.Separator();
        lbNext = new javax.swing.JLabel();
        jSeparator18 = new javax.swing.JToolBar.Separator();
        lbExit = new javax.swing.JLabel();
        jMenuBar1 = new javax.swing.JMenuBar();
        jMenu1 = new javax.swing.JMenu();
        jMenuItemOpenFile = new javax.swing.JMenuItem();
        jMenu2 = new javax.swing.JMenu();
        jMenu3 = new javax.swing.JMenu();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        setTitle("Maquina Virtual Monociclo 1.0");
        setBackground(new java.awt.Color(255, 255, 255));
        setMaximumSize(new java.awt.Dimension(1600, 800));
        setPreferredSize(new java.awt.Dimension(1000, 700));

        jTabbedPaneInfo.setPreferredSize(new java.awt.Dimension(950, 640));

        jPanelViaDados.setPreferredSize(new java.awt.Dimension(940, 615));

        lbAdder.setBackground(new java.awt.Color(255, 255, 51));
        lbAdder.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
        lbAdder.setText("0000");
        lbAdder.setOpaque(true);

        lbFunct.setBackground(new java.awt.Color(255, 255, 51));
        lbFunct.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
        lbFunct.setText("000000");
        lbFunct.setOpaque(true);

        lbInstruction.setBackground(new java.awt.Color(255, 255, 0));
        lbInstruction.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
        lbInstruction.setText("000000000000000000000000000");
        lbInstruction.setOpaque(true);

        lbWriteReg.setBackground(new java.awt.Color(255, 255, 51));
        lbWriteReg.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
        lbWriteReg.setText("000");
        lbWriteReg.setOpaque(true);

        lbRt.setBackground(new java.awt.Color(255, 255, 51));
        lbRt.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
        lbRt.setText("00000");
        lbRt.setOpaque(true);

        lbRd.setBackground(new java.awt.Color(255, 255, 51));
        lbRd.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
        lbRd.setText("00000");
        lbRd.setOpaque(true);

        lbIncPc.setBackground(new java.awt.Color(255, 255, 51));
        lbIncPc.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
        lbIncPc.setText("0000");
        lbIncPc.setOpaque(true);

        lbPcSrc.setBackground(new java.awt.Color(0, 204, 51));
        lbPcSrc.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
        lbPcSrc.setText("0");
        lbPcSrc.setOpaque(true);

        lbRs.setBackground(new java.awt.Color(255, 255, 51));
        lbRs.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
        lbRs.setText("00000");
        lbRs.setOpaque(true);

        lbWriteData.setBackground(new java.awt.Color(255, 255, 51));
        lbWriteData.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
        lbWriteData.setText("000");
        lbWriteData.setOpaque(true);

        lbOpcode.setBackground(new java.awt.Color(255, 255, 51));
        lbOpcode.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
        lbOpcode.setText("000000");
        lbOpcode.setOpaque(true);

        lbPc.setBackground(new java.awt.Color(255, 255, 51));
        lbPc.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
        lbPc.setText("000");
        lbPc.setOpaque(true);

        lbResult.setBackground(new java.awt.Color(255, 255, 51));
        lbResult.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
        lbResult.setText("0000");
        lbResult.setOpaque(true);

        lbSignalAluSrc.setBackground(new java.awt.Color(0, 204, 51));
        lbSignalAluSrc.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
        lbSignalAluSrc.setText("0");
        lbSignalAluSrc.setOpaque(true);

        lbSignalBranch.setBackground(new java.awt.Color(0, 204, 51));
        lbSignalBranch.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
        lbSignalBranch.setText("0");
        lbSignalBranch.setOpaque(true);

        lbSignalAluControl.setBackground(new java.awt.Color(0, 204, 51));
        lbSignalAluControl.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
        lbSignalAluControl.setText("00");
        lbSignalAluControl.setOpaque(true);

        lbSignalAluOp.setBackground(new java.awt.Color(0, 204, 51));
        lbSignalAluOp.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
        lbSignalAluOp.setText("00");
        lbSignalAluOp.setOpaque(true);

        lbSignalRegWrite.setBackground(new java.awt.Color(0, 204, 51));
        lbSignalRegWrite.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
        lbSignalRegWrite.setText("0");
        lbSignalRegWrite.setOpaque(true);

        lbSignalMemToReg.setBackground(new java.awt.Color(0, 204, 51));
        lbSignalMemToReg.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
        lbSignalMemToReg.setText("0");
        lbSignalMemToReg.setOpaque(true);

        lbSignalRegDst.setBackground(new java.awt.Color(0, 204, 51));
        lbSignalRegDst.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
        lbSignalRegDst.setText("0");
        lbSignalRegDst.setOpaque(true);

        lbSignalMemRead.setBackground(new java.awt.Color(0, 204, 51));
        lbSignalMemRead.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
        lbSignalMemRead.setText("0");
        lbSignalMemRead.setOpaque(true);

        lbSignalMemWrite.setBackground(new java.awt.Color(0, 204, 51));
        lbSignalMemWrite.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
        lbSignalMemWrite.setText("0");
        lbSignalMemWrite.setOpaque(true);

        lbZero.setBackground(new java.awt.Color(0, 204, 51));
        lbZero.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
        lbZero.setText("0");
        lbZero.setOpaque(true);

        lbSinalAndbneorAndBranch.setBackground(new java.awt.Color(0, 204, 51));
        lbSinalAndbneorAndBranch.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
        lbSinalAndbneorAndBranch.setText("0");
        lbSinalAndbneorAndBranch.setOpaque(true);

        lbSinalJump.setBackground(new java.awt.Color(0, 204, 51));
        lbSinalJump.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
        lbSinalJump.setText("0");
        lbSinalJump.setOpaque(true);

        lbSinalBne.setBackground(new java.awt.Color(0, 204, 51));
        lbSinalBne.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
        lbSinalBne.setText("0");
        lbSinalBne.setOpaque(true);

        lbSinalZero.setBackground(new java.awt.Color(0, 204, 51));
        lbSinalZero.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
        lbSinalZero.setText("0");
        lbSinalZero.setOpaque(true);

        lbSignalLui.setBackground(new java.awt.Color(0, 204, 51));
        lbSignalLui.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
        lbSignalLui.setText("0");
        lbSignalLui.setOpaque(true);

        lbSinalBneAndZero.setBackground(new java.awt.Color(0, 204, 51));
        lbSinalBneAndZero.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
        lbSinalBneAndZero.setText("0");
        lbSinalBneAndZero.setOpaque(true);

        lbSinalJumpjr.setBackground(new java.awt.Color(0, 204, 51));
        lbSinalJumpjr.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
        lbSinalJumpjr.setText("0");
        lbSinalJumpjr.setOpaque(true);

        javax.swing.GroupLayout panelImagemFundo1Layout = new javax.swing.GroupLayout(panelImagemFundo1);
        panelImagemFundo1.setLayout(panelImagemFundo1Layout);
        panelImagemFundo1Layout.setHorizontalGroup(
            panelImagemFundo1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, panelImagemFundo1Layout.createSequentialGroup()
                .addContainerGap(159, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGroup(panelImagemFundo1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, panelImagemFundo1Layout.createSequentialGroup()
                        .addGap(0, 0, Short.MAX_VALUE)
                        .addComponent(lbSignalAluSrc)
                        .addGroup(panelImagemFundo1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, panelImagemFundo1Layout.createSequentialGroup()
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(lbSignalMemToReg, javax.swing.GroupLayout.PREFERRED_SIZE, 7, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addGap(63, 63, 63))
                            .addGroup(panelImagemFundo1Layout.createSequentialGroup()
                                .addGap(124, 124, 124)
                                .addGroup(panelImagemFundo1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(lbZero)
                                    .addComponent(lbSignalBranch))
                                .addGap(225, 225, 225))))
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, panelImagemFundo1Layout.createSequentialGroup()
                        .addGroup(panelImagemFundo1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addGroup(panelImagemFundo1Layout.createSequentialGroup()
                                .addGap(0, 0, Short.MAX_VALUE)
                                .addComponent(lbSinalAndbneorAndBranch)
                                .addGap(12, 12, 12))
                            .addGroup(panelImagemFundo1Layout.createSequentialGroup()
                                .addGroup(panelImagemFundo1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                                    .addGroup(panelImagemFundo1Layout.createSequentialGroup()
                                        .addComponent(lbIncPc, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)
                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                        .addComponent(lbAdder, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE))
                                    .addGroup(javax.swing.GroupLayout.Alignment.LEADING, panelImagemFundo1Layout.createSequentialGroup()
                                        .addGap(129, 129, 129)
                                        .addGroup(panelImagemFundo1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                            .addComponent(lbRt)
                                            .addComponent(lbRd)
                                            .addGroup(panelImagemFundo1Layout.createSequentialGroup()
                                                .addComponent(lbRs)
                                                .addGap(128, 128, 128)
                                                .addComponent(lbSignalRegWrite))
                                            .addComponent(lbOpcode))
                                        .addGap(0, 260, Short.MAX_VALUE))
                                    .addGroup(panelImagemFundo1Layout.createSequentialGroup()
                                        .addGap(0, 0, Short.MAX_VALUE)
                                        .addComponent(lbResult, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)))
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addGroup(panelImagemFundo1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addGroup(panelImagemFundo1Layout.createSequentialGroup()
                                        .addComponent(lbSinalBne)
                                        .addGap(28, 28, 28)
                                        .addComponent(lbSinalBneAndZero))
                                    .addGroup(panelImagemFundo1Layout.createSequentialGroup()
                                        .addComponent(lbSinalZero)
                                        .addGap(57, 57, 57)
                                        .addComponent(lbSignalMemWrite)))))
                        .addGap(91, 91, 91)
                        .addComponent(lbSinalJumpjr)
                        .addGap(42, 42, 42))))
            .addGroup(panelImagemFundo1Layout.createSequentialGroup()
                .addGroup(panelImagemFundo1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(panelImagemFundo1Layout.createSequentialGroup()
                        .addGap(355, 355, 355)
                        .addComponent(lbSignalRegDst)
                        .addGap(273, 273, 273)
                        .addComponent(lbSignalAluControl))
                    .addGroup(panelImagemFundo1Layout.createSequentialGroup()
                        .addGap(22, 22, 22)
                        .addComponent(lbPc, javax.swing.GroupLayout.PREFERRED_SIZE, 24, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(320, 320, 320)
                        .addGroup(panelImagemFundo1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                            .addComponent(lbWriteData, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(lbWriteReg, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))
                    .addGroup(panelImagemFundo1Layout.createSequentialGroup()
                        .addContainerGap()
                        .addComponent(lbInstruction)))
                .addContainerGap())
            .addGroup(panelImagemFundo1Layout.createSequentialGroup()
                .addGap(424, 424, 424)
                .addComponent(lbFunct)
                .addGap(0, 0, Short.MAX_VALUE))
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, panelImagemFundo1Layout.createSequentialGroup()
                .addGap(331, 331, 331)
                .addComponent(lbSignalLui)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addComponent(lbSignalMemRead)
                .addGap(154, 154, 154))
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, panelImagemFundo1Layout.createSequentialGroup()
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addGroup(panelImagemFundo1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, panelImagemFundo1Layout.createSequentialGroup()
                        .addComponent(lbSignalAluOp)
                        .addGap(316, 316, 316))
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, panelImagemFundo1Layout.createSequentialGroup()
                        .addComponent(lbPcSrc)
                        .addGap(179, 179, 179))
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, panelImagemFundo1Layout.createSequentialGroup()
                        .addComponent(lbSinalJump)
                        .addGap(88, 88, 88))))
        );
        panelImagemFundo1Layout.setVerticalGroup(
            panelImagemFundo1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(panelImagemFundo1Layout.createSequentialGroup()
                .addGroup(panelImagemFundo1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(panelImagemFundo1Layout.createSequentialGroup()
                        .addGap(114, 114, 114)
                        .addComponent(lbIncPc)
                        .addGap(73, 73, 73))
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, panelImagemFundo1Layout.createSequentialGroup()
                        .addContainerGap()
                        .addComponent(lbAdder)
                        .addGap(61, 61, 61)
                        .addComponent(lbSignalBranch)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)))
                .addComponent(lbZero)
                .addGap(67, 67, 67)
                .addComponent(lbSinalBne)
                .addGap(18, 18, 18)
                .addComponent(lbSinalZero)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 34, Short.MAX_VALUE)
                .addGroup(panelImagemFundo1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, panelImagemFundo1Layout.createSequentialGroup()
                        .addGroup(panelImagemFundo1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(lbWriteReg)
                            .addComponent(lbResult))
                        .addGap(18, 18, 18)
                        .addComponent(lbWriteData)
                        .addGap(18, 18, 18)
                        .addComponent(lbSignalRegDst)
                        .addGap(41, 41, 41)
                        .addComponent(lbSignalMemRead)
                        .addGap(107, 107, 107))
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, panelImagemFundo1Layout.createSequentialGroup()
                        .addComponent(lbPc)
                        .addGap(76, 76, 76)
                        .addComponent(lbInstruction)
                        .addGap(144, 144, 144))))
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, panelImagemFundo1Layout.createSequentialGroup()
                .addGap(187, 187, 187)
                .addComponent(lbOpcode)
                .addGroup(panelImagemFundo1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(panelImagemFundo1Layout.createSequentialGroup()
                        .addGap(91, 91, 91)
                        .addComponent(lbRs)
                        .addGap(18, 18, 18)
                        .addGroup(panelImagemFundo1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(lbRt)
                            .addComponent(lbSignalMemWrite))
                        .addGap(53, 53, 53)
                        .addComponent(lbRd)
                        .addGap(95, 95, 95)
                        .addComponent(lbSignalLui)
                        .addGap(0, 0, Short.MAX_VALUE))
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, panelImagemFundo1Layout.createSequentialGroup()
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(lbSignalRegWrite)
                        .addGap(55, 55, 55)
                        .addComponent(lbSignalAluSrc)
                        .addGap(59, 59, 59)
                        .addComponent(lbSignalAluControl)
                        .addGap(77, 77, 77)
                        .addComponent(lbFunct)
                        .addGap(25, 25, 25)
                        .addComponent(lbSignalAluOp)
                        .addGap(40, 40, 40))))
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, panelImagemFundo1Layout.createSequentialGroup()
                .addGap(44, 44, 44)
                .addComponent(lbSinalJump)
                .addGap(38, 38, 38)
                .addComponent(lbSinalJumpjr)
                .addGap(30, 30, 30)
                .addComponent(lbSinalAndbneorAndBranch)
                .addGap(19, 19, 19)
                .addComponent(lbPcSrc)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addComponent(lbSinalBneAndZero)
                .addGap(73, 73, 73)
                .addComponent(lbSignalMemToReg)
                .addGap(235, 235, 235))
        );

        javax.swing.GroupLayout jPanelViaDadosLayout = new javax.swing.GroupLayout(jPanelViaDados);
        jPanelViaDados.setLayout(jPanelViaDadosLayout);
        jPanelViaDadosLayout.setHorizontalGroup(
            jPanelViaDadosLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanelViaDadosLayout.createSequentialGroup()
                .addComponent(panelImagemFundo1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(0, 0, Short.MAX_VALUE))
        );
        jPanelViaDadosLayout.setVerticalGroup(
            jPanelViaDadosLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanelViaDadosLayout.createSequentialGroup()
                .addComponent(panelImagemFundo1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(0, 2, Short.MAX_VALUE))
        );

        jTabbedPaneInfo.addTab("Via de Dados", jPanelViaDados);

        jPanelInfo.setPreferredSize(new java.awt.Dimension(940, 615));

        jPanelRegister.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Registradores", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, null, java.awt.Color.black));

        jTableRegister.setBorder(javax.swing.BorderFactory.createEtchedBorder());
        jTableRegister.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {
                {"", null},
                {"", null},
                {"", null},
                {"", null},
                {"", null},
                {"", null},
                {"", null},
                {"", null},
                {"", null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null}
            },
            new String [] {
                "Reg", "Conteúdo"
            }
        ));
        jTableRegister.setMaximumSize(new java.awt.Dimension(150, 496));
        jTableRegister.setMinimumSize(new java.awt.Dimension(20, 496));
        jTableRegister.setPreferredSize(new java.awt.Dimension(100, 496));
        jScrollPaneRegister.setViewportView(jTableRegister);

        javax.swing.GroupLayout jPanelRegisterLayout = new javax.swing.GroupLayout(jPanelRegister);
        jPanelRegister.setLayout(jPanelRegisterLayout);
        jPanelRegisterLayout.setHorizontalGroup(
            jPanelRegisterLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanelRegisterLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jScrollPaneRegister, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE)
                .addContainerGap())
        );
        jPanelRegisterLayout.setVerticalGroup(
            jPanelRegisterLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanelRegisterLayout.createSequentialGroup()
                .addGap(0, 0, Short.MAX_VALUE)
                .addComponent(jScrollPaneRegister, javax.swing.GroupLayout.PREFERRED_SIZE, 524, javax.swing.GroupLayout.PREFERRED_SIZE))
        );

        jPanelInst.setBorder(javax.swing.BorderFactory.createTitledBorder("Instruções"));

        jTableInst.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null}
            },
            new String [] {
                "Endereço", "Instrução"
            }
        ) {
            Class[] types = new Class [] {
                java.lang.String.class, java.lang.String.class
            };

            public Class getColumnClass(int columnIndex) {
                return types [columnIndex];
            }
        });
        jScrollPaneInst.setViewportView(jTableInst);
        jTableInst.getColumnModel().getColumn(0).setPreferredWidth(10);
        jTableInst.getColumnModel().getColumn(1).setPreferredWidth(200);

        javax.swing.GroupLayout jPanelInstLayout = new javax.swing.GroupLayout(jPanelInst);
        jPanelInst.setLayout(jPanelInstLayout);
        jPanelInstLayout.setHorizontalGroup(
            jPanelInstLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jScrollPaneInst, javax.swing.GroupLayout.DEFAULT_SIZE, 393, Short.MAX_VALUE)
        );
        jPanelInstLayout.setVerticalGroup(
            jPanelInstLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jScrollPaneInst, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE)
        );

        jPanelTypeInst.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Formato de Instrução", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, null, java.awt.Color.black));

        jPanelFormatR.setBorder(javax.swing.BorderFactory.createTitledBorder("Formato R"));
        jPanelFormatR.setPreferredSize(new java.awt.Dimension(200, 79));

        jLabel4.setText("Rs");

        jLabel5.setText("Rt");

        jLabel6.setText("Rd");

        jLabel7.setText("Shamt");

        jLabel8.setText("Funct");

        jTextFieldOpcodeR.setBackground(new java.awt.Color(255, 255, 0));
        jTextFieldOpcodeR.setText("000000");

        jTextFieldRsR.setBackground(new java.awt.Color(255, 255, 0));
        jTextFieldRsR.setText("00000");

        jTextFieldRtR.setBackground(new java.awt.Color(255, 255, 0));
        jTextFieldRtR.setText("00000");

        jTextFieldRdR.setBackground(new java.awt.Color(255, 255, 0));
        jTextFieldRdR.setText("00000");

        jTextFieldShamt.setBackground(new java.awt.Color(255, 255, 0));
        jTextFieldShamt.setText("00000");

        jTextFieldFunct.setBackground(new java.awt.Color(255, 255, 0));
        jTextFieldFunct.setText("000000");

        jSeparator6.setOrientation(javax.swing.SwingConstants.VERTICAL);

        jSeparator9.setOrientation(javax.swing.SwingConstants.VERTICAL);

        jSeparator15.setOrientation(javax.swing.SwingConstants.VERTICAL);

        jSeparator16.setOrientation(javax.swing.SwingConstants.VERTICAL);

        jSeparator17.setOrientation(javax.swing.SwingConstants.VERTICAL);

        jLabel24.setText("Opcode");

        javax.swing.GroupLayout jPanelFormatRLayout = new javax.swing.GroupLayout(jPanelFormatR);
        jPanelFormatR.setLayout(jPanelFormatRLayout);
        jPanelFormatRLayout.setHorizontalGroup(
            jPanelFormatRLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanelFormatRLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanelFormatRLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jTextFieldOpcodeR, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel24))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jSeparator17, javax.swing.GroupLayout.PREFERRED_SIZE, 2, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanelFormatRLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addGroup(jPanelFormatRLayout.createSequentialGroup()
                        .addComponent(jLabel4)
                        .addGap(48, 48, 48)
                        .addComponent(jLabel5)
                        .addGap(41, 41, 41))
                    .addGroup(jPanelFormatRLayout.createSequentialGroup()
                        .addComponent(jTextFieldRsR, javax.swing.GroupLayout.PREFERRED_SIZE, 46, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jSeparator6, javax.swing.GroupLayout.PREFERRED_SIZE, 2, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(jTextFieldRtR, javax.swing.GroupLayout.PREFERRED_SIZE, 46, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)))
                .addComponent(jSeparator9, javax.swing.GroupLayout.PREFERRED_SIZE, 2, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanelFormatRLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jTextFieldRdR, javax.swing.GroupLayout.PREFERRED_SIZE, 46, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel6))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jSeparator15, javax.swing.GroupLayout.PREFERRED_SIZE, 2, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanelFormatRLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jTextFieldShamt, javax.swing.GroupLayout.PREFERRED_SIZE, 46, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel7))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jSeparator16, javax.swing.GroupLayout.PREFERRED_SIZE, 2, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanelFormatRLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jTextFieldFunct, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel8))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        jPanelFormatRLayout.setVerticalGroup(
            jPanelFormatRLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanelFormatRLayout.createSequentialGroup()
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addGroup(jPanelFormatRLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jSeparator16, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jSeparator15, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGroup(jPanelFormatRLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                        .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanelFormatRLayout.createSequentialGroup()
                            .addGroup(jPanelFormatRLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                .addComponent(jSeparator6, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addComponent(jSeparator17, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addComponent(jTextFieldRsR, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addComponent(jTextFieldRtR, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGap(20, 20, 20))
                        .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanelFormatRLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jSeparator9, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addGroup(jPanelFormatRLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanelFormatRLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(jLabel4)
                                    .addComponent(jLabel5, javax.swing.GroupLayout.Alignment.TRAILING))
                                .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanelFormatRLayout.createSequentialGroup()
                                    .addComponent(jTextFieldOpcodeR, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                    .addComponent(jLabel24))
                                .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanelFormatRLayout.createSequentialGroup()
                                    .addComponent(jTextFieldShamt, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                    .addComponent(jLabel7))
                                .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanelFormatRLayout.createSequentialGroup()
                                    .addComponent(jTextFieldRdR, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                    .addComponent(jLabel6))
                                .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanelFormatRLayout.createSequentialGroup()
                                    .addComponent(jTextFieldFunct, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                    .addComponent(jLabel8)))))))
        );

        jPanelFormatI.setBorder(javax.swing.BorderFactory.createTitledBorder("Formato I"));
        jPanelFormatI.setPreferredSize(new java.awt.Dimension(457, 79));

        jLabel3.setText("Opcode");

        jTextFieldOpcodeI.setText("000000");

        jTextFieldRsI.setText("00000");

        jTextFieldRtI.setText("00000");

        jTextFieldAddressI.setText("0000000000000000");

        jLabel9.setText("Rs");

        jLabel10.setText("Rt");

        jLabel11.setText("Address");

        jSeparator2.setOrientation(javax.swing.SwingConstants.VERTICAL);

        jSeparator5.setOrientation(javax.swing.SwingConstants.VERTICAL);

        jSeparator7.setOrientation(javax.swing.SwingConstants.VERTICAL);

        jSeparator8.setOrientation(javax.swing.SwingConstants.VERTICAL);

        javax.swing.GroupLayout jPanelFormatILayout = new javax.swing.GroupLayout(jPanelFormatI);
        jPanelFormatI.setLayout(jPanelFormatILayout);
        jPanelFormatILayout.setHorizontalGroup(
            jPanelFormatILayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanelFormatILayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanelFormatILayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jTextFieldOpcodeI, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel3))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanelFormatILayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanelFormatILayout.createSequentialGroup()
                        .addComponent(jSeparator5, javax.swing.GroupLayout.PREFERRED_SIZE, 2, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jTextFieldRsI, javax.swing.GroupLayout.PREFERRED_SIZE, 46, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jSeparator7, javax.swing.GroupLayout.PREFERRED_SIZE, 2, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(jPanelFormatILayout.createSequentialGroup()
                        .addGap(10, 10, 10)
                        .addComponent(jLabel9)))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanelFormatILayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanelFormatILayout.createSequentialGroup()
                        .addComponent(jTextFieldRtI, javax.swing.GroupLayout.PREFERRED_SIZE, 46, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jSeparator8, javax.swing.GroupLayout.PREFERRED_SIZE, 2, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addComponent(jLabel10))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanelFormatILayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanelFormatILayout.createSequentialGroup()
                        .addComponent(jLabel11)
                        .addContainerGap())
                    .addComponent(jTextFieldAddressI, javax.swing.GroupLayout.DEFAULT_SIZE, 177, Short.MAX_VALUE)))
            .addGroup(jPanelFormatILayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(jPanelFormatILayout.createSequentialGroup()
                    .addGap(0, 213, Short.MAX_VALUE)
                    .addComponent(jSeparator2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGap(0, 213, Short.MAX_VALUE)))
        );
        jPanelFormatILayout.setVerticalGroup(
            jPanelFormatILayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanelFormatILayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanelFormatILayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jTextFieldAddressI, javax.swing.GroupLayout.Alignment.TRAILING)
                    .addGroup(jPanelFormatILayout.createSequentialGroup()
                        .addGroup(jPanelFormatILayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(jPanelFormatILayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                                .addComponent(jTextFieldOpcodeI)
                                .addComponent(jTextFieldRsI)
                                .addComponent(jSeparator5))
                            .addComponent(jTextFieldRtI, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jSeparator8, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jSeparator7, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGap(0, 0, Short.MAX_VALUE)))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanelFormatILayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanelFormatILayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(jLabel3)
                        .addComponent(jLabel9))
                    .addComponent(jLabel10)
                    .addComponent(jLabel11))
                .addGap(5, 5, 5))
            .addGroup(jPanelFormatILayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(jPanelFormatILayout.createSequentialGroup()
                    .addGap(0, 28, Short.MAX_VALUE)
                    .addComponent(jSeparator2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGap(0, 28, Short.MAX_VALUE)))
        );

        jPanelFormatJ.setBorder(javax.swing.BorderFactory.createTitledBorder("Formato J"));
        jPanelFormatJ.setPreferredSize(new java.awt.Dimension(423, 79));

        jSeparator4.setOrientation(javax.swing.SwingConstants.VERTICAL);

        jTextFieldOpcodeJ.setText("000000");

        jTextFieldAddressJ.setText("0000000000000000000000000");

        jLabel2.setText("Opcode");

        jLabel1.setText("Address");

        javax.swing.GroupLayout jPanelFormatJLayout = new javax.swing.GroupLayout(jPanelFormatJ);
        jPanelFormatJ.setLayout(jPanelFormatJLayout);
        jPanelFormatJLayout.setHorizontalGroup(
            jPanelFormatJLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanelFormatJLayout.createSequentialGroup()
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addGroup(jPanelFormatJLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel2)
                    .addGroup(jPanelFormatJLayout.createSequentialGroup()
                        .addComponent(jTextFieldOpcodeJ, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jSeparator4, javax.swing.GroupLayout.PREFERRED_SIZE, 2, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addGroup(jPanelFormatJLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanelFormatJLayout.createSequentialGroup()
                        .addGap(13, 13, 13)
                        .addComponent(jLabel1))
                    .addGroup(jPanelFormatJLayout.createSequentialGroup()
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jTextFieldAddressJ, javax.swing.GroupLayout.PREFERRED_SIZE, 297, javax.swing.GroupLayout.PREFERRED_SIZE))))
        );
        jPanelFormatJLayout.setVerticalGroup(
            jPanelFormatJLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanelFormatJLayout.createSequentialGroup()
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addGroup(jPanelFormatJLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jTextFieldAddressJ, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jSeparator4, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jTextFieldOpcodeJ, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanelFormatJLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel2, javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(jLabel1)))
        );

        javax.swing.GroupLayout jPanelTypeInstLayout = new javax.swing.GroupLayout(jPanelTypeInst);
        jPanelTypeInst.setLayout(jPanelTypeInstLayout);
        jPanelTypeInstLayout.setHorizontalGroup(
            jPanelTypeInstLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanelTypeInstLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanelTypeInstLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(jPanelFormatI, javax.swing.GroupLayout.DEFAULT_SIZE, 383, Short.MAX_VALUE)
                    .addComponent(jPanelFormatR, javax.swing.GroupLayout.DEFAULT_SIZE, 383, Short.MAX_VALUE)
                    .addComponent(jPanelFormatJ, javax.swing.GroupLayout.DEFAULT_SIZE, 383, Short.MAX_VALUE)))
        );
        jPanelTypeInstLayout.setVerticalGroup(
            jPanelTypeInstLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanelTypeInstLayout.createSequentialGroup()
                .addComponent(jPanelFormatR, javax.swing.GroupLayout.DEFAULT_SIZE, 74, Short.MAX_VALUE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jPanelFormatI, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jPanelFormatJ, javax.swing.GroupLayout.DEFAULT_SIZE, 74, Short.MAX_VALUE)
                .addContainerGap())
        );

        jPanelSignalControl.setBorder(javax.swing.BorderFactory.createTitledBorder("Sinais de controle"));

        jLabel25.setText("RegDst");

        jLabel26.setText("Branch");

        jLabel27.setText("MemRead");

        jLabel28.setText("MemToReg");

        jLabel29.setText("AluOp");

        jLabel30.setText("MemWrite");

        jLabel31.setText("AluSrc");

        jLabel32.setText("AluControl");

        jLabel33.setText("RegWrite");

        jLabel34.setText("Zero");

        jLabel35.setText("PcSrc");

        jLabelBranch.setBackground(new java.awt.Color(0, 204, 51));
        jLabelBranch.setText("0");
        jLabelBranch.setOpaque(true);

        jLabelRegDst.setBackground(new java.awt.Color(0, 204, 51));
        jLabelRegDst.setText("0");
        jLabelRegDst.setName("");
        jLabelRegDst.setOpaque(true);

        jLabelMemToReg.setBackground(new java.awt.Color(0, 204, 51));
        jLabelMemToReg.setText("0");
        jLabelMemToReg.setOpaque(true);

        jLabelMemRead.setBackground(new java.awt.Color(0, 204, 51));
        jLabelMemRead.setText("0");
        jLabelMemRead.setOpaque(true);

        jLabelAluOp.setBackground(new java.awt.Color(0, 204, 51));
        jLabelAluOp.setText("0");
        jLabelAluOp.setOpaque(true);

        jLabelMemWrite.setBackground(new java.awt.Color(0, 204, 51));
        jLabelMemWrite.setText("0");
        jLabelMemWrite.setOpaque(true);

        jLabelAluSrc.setBackground(new java.awt.Color(0, 204, 51));
        jLabelAluSrc.setText("0");
        jLabelAluSrc.setOpaque(true);

        jLabelAluControl.setBackground(new java.awt.Color(0, 204, 51));
        jLabelAluControl.setText("0");
        jLabelAluControl.setOpaque(true);

        jLabelRegWrite.setBackground(new java.awt.Color(0, 204, 51));
        jLabelRegWrite.setText("0");
        jLabelRegWrite.setOpaque(true);

        jLabelZero.setBackground(new java.awt.Color(0, 204, 51));
        jLabelZero.setText("0");
        jLabelZero.setOpaque(true);

        jLabelPcSrc.setBackground(new java.awt.Color(0, 204, 51));
        jLabelPcSrc.setText("0");
        jLabelPcSrc.setOpaque(true);

        javax.swing.GroupLayout jPanelSignalControlLayout = new javax.swing.GroupLayout(jPanelSignalControl);
        jPanelSignalControl.setLayout(jPanelSignalControlLayout);
        jPanelSignalControlLayout.setHorizontalGroup(
            jPanelSignalControlLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanelSignalControlLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanelSignalControlLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanelSignalControlLayout.createSequentialGroup()
                        .addComponent(jLabel35)
                        .addGap(52, 52, 52)
                        .addComponent(jLabelPcSrc, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanelSignalControlLayout.createSequentialGroup()
                        .addComponent(jLabel34)
                        .addGap(56, 56, 56)
                        .addComponent(jLabelZero, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanelSignalControlLayout.createSequentialGroup()
                        .addComponent(jLabel33)
                        .addGap(33, 33, 33)
                        .addComponent(jLabelRegWrite, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanelSignalControlLayout.createSequentialGroup()
                        .addComponent(jLabel32)
                        .addGap(28, 28, 28)
                        .addComponent(jLabelAluControl, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanelSignalControlLayout.createSequentialGroup()
                        .addComponent(jLabel31)
                        .addGap(48, 48, 48)
                        .addComponent(jLabelAluSrc, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanelSignalControlLayout.createSequentialGroup()
                        .addComponent(jLabel30)
                        .addGap(30, 30, 30)
                        .addComponent(jLabelMemWrite, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanelSignalControlLayout.createSequentialGroup()
                        .addGroup(jPanelSignalControlLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel25)
                            .addComponent(jLabel26)
                            .addComponent(jLabel28)
                            .addComponent(jLabel27)
                            .addComponent(jLabel29))
                        .addGap(25, 25, 25)
                        .addGroup(jPanelSignalControlLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLabelBranch, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(jLabelRegDst, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(jLabelMemRead, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(jLabelMemToReg, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(jLabelAluOp, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))))
                .addGap(24, 24, 24))
        );
        jPanelSignalControlLayout.setVerticalGroup(
            jPanelSignalControlLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanelSignalControlLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanelSignalControlLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel25)
                    .addComponent(jLabelRegDst, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanelSignalControlLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel26)
                    .addComponent(jLabelBranch, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanelSignalControlLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(jLabelMemRead, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jLabel27, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanelSignalControlLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(jLabel28, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jLabelMemToReg, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanelSignalControlLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel29)
                    .addComponent(jLabelAluOp, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanelSignalControlLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel30)
                    .addComponent(jLabelMemWrite, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanelSignalControlLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel31)
                    .addComponent(jLabelAluSrc, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanelSignalControlLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel32)
                    .addComponent(jLabelAluControl, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanelSignalControlLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel33)
                    .addComponent(jLabelRegWrite, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanelSignalControlLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel34)
                    .addComponent(jLabelZero, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanelSignalControlLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel35)
                    .addComponent(jLabelPcSrc, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addGap(108, 108, 108))
        );

        jPanelReg.setBorder(javax.swing.BorderFactory.createTitledBorder("Registradores"));

        jLabel12.setText("WriteReg");

        jLabel13.setText("Read Register2");

        jLabel14.setText("Read Data1");

        jLabel15.setText("WriteData");

        jLabel16.setText("Read Register1");

        jLabel17.setText("Read Data2");

        jLabelReadReg1.setBackground(new java.awt.Color(255, 255, 51));
        jLabelReadReg1.setText("00");
        jLabelReadReg1.setOpaque(true);

        jLabelReadReg2.setBackground(new java.awt.Color(255, 255, 51));
        jLabelReadReg2.setText("00");
        jLabelReadReg2.setOpaque(true);

        jLabelReadData1.setBackground(new java.awt.Color(255, 255, 51));
        jLabelReadData1.setText("00");
        jLabelReadData1.setOpaque(true);

        jLabelReadData2.setBackground(new java.awt.Color(255, 255, 51));
        jLabelReadData2.setText("00");
        jLabelReadData2.setOpaque(true);

        jLabelWriteReg.setBackground(new java.awt.Color(255, 255, 51));
        jLabelWriteReg.setText("00");
        jLabelWriteReg.setOpaque(true);

        jLabelWriteData.setBackground(new java.awt.Color(255, 255, 51));
        jLabelWriteData.setText("00");
        jLabelWriteData.setOpaque(true);

        javax.swing.GroupLayout jPanelRegLayout = new javax.swing.GroupLayout(jPanelReg);
        jPanelReg.setLayout(jPanelRegLayout);
        jPanelRegLayout.setHorizontalGroup(
            jPanelRegLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanelRegLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanelRegLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanelRegLayout.createSequentialGroup()
                        .addComponent(jLabel16)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 34, Short.MAX_VALUE)
                        .addComponent(jLabelReadReg1, javax.swing.GroupLayout.PREFERRED_SIZE, 17, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(jPanelRegLayout.createSequentialGroup()
                        .addComponent(jLabel15)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(jLabelWriteData, javax.swing.GroupLayout.PREFERRED_SIZE, 17, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(jPanelRegLayout.createSequentialGroup()
                        .addComponent(jLabel13)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(jLabelReadReg2, javax.swing.GroupLayout.PREFERRED_SIZE, 17, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(jPanelRegLayout.createSequentialGroup()
                        .addComponent(jLabel14)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(jLabelReadData1, javax.swing.GroupLayout.PREFERRED_SIZE, 17, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(jPanelRegLayout.createSequentialGroup()
                        .addComponent(jLabel17)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(jLabelReadData2, javax.swing.GroupLayout.PREFERRED_SIZE, 17, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(jPanelRegLayout.createSequentialGroup()
                        .addComponent(jLabel12)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(jLabelWriteReg, javax.swing.GroupLayout.PREFERRED_SIZE, 17, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addContainerGap())
        );
        jPanelRegLayout.setVerticalGroup(
            jPanelRegLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanelRegLayout.createSequentialGroup()
                .addContainerGap(12, Short.MAX_VALUE)
                .addGroup(jPanelRegLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel16)
                    .addComponent(jLabelReadReg1))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanelRegLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel13)
                    .addComponent(jLabelReadReg2))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanelRegLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel14)
                    .addComponent(jLabelReadData1))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanelRegLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel17)
                    .addComponent(jLabelReadData2))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanelRegLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel12)
                    .addComponent(jLabelWriteReg))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanelRegLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel15)
                    .addComponent(jLabelWriteData)))
        );

        jPanelMemoryRead.setBorder(javax.swing.BorderFactory.createTitledBorder("Memória de dados"));

        jLabel18.setText("Adress");

        jLabel19.setText("WriteData");

        jLabel20.setText("ReadData");

        jLabelAdress.setBackground(new java.awt.Color(255, 255, 51));
        jLabelAdress.setText("00");
        jLabelAdress.setOpaque(true);

        jLabelWriteDataMD.setBackground(new java.awt.Color(255, 255, 51));
        jLabelWriteDataMD.setText("00");
        jLabelWriteDataMD.setOpaque(true);

        jLabelReadData.setBackground(new java.awt.Color(255, 255, 51));
        jLabelReadData.setText("00");
        jLabelReadData.setOpaque(true);

        javax.swing.GroupLayout jPanelMemoryReadLayout = new javax.swing.GroupLayout(jPanelMemoryRead);
        jPanelMemoryRead.setLayout(jPanelMemoryReadLayout);
        jPanelMemoryReadLayout.setHorizontalGroup(
            jPanelMemoryReadLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanelMemoryReadLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanelMemoryReadLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanelMemoryReadLayout.createSequentialGroup()
                        .addComponent(jLabel18)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(jLabelAdress, javax.swing.GroupLayout.PREFERRED_SIZE, 17, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(jPanelMemoryReadLayout.createSequentialGroup()
                        .addComponent(jLabel20)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(jLabelReadData, javax.swing.GroupLayout.PREFERRED_SIZE, 17, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(jPanelMemoryReadLayout.createSequentialGroup()
                        .addComponent(jLabel19)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(jLabelWriteDataMD, javax.swing.GroupLayout.PREFERRED_SIZE, 17, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addContainerGap())
        );
        jPanelMemoryReadLayout.setVerticalGroup(
            jPanelMemoryReadLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanelMemoryReadLayout.createSequentialGroup()
                .addContainerGap(12, Short.MAX_VALUE)
                .addGroup(jPanelMemoryReadLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel18)
                    .addComponent(jLabelAdress))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanelMemoryReadLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel19)
                    .addComponent(jLabelWriteDataMD))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanelMemoryReadLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel20)
                    .addComponent(jLabelReadData)))
        );

        jPanelAlu.setBorder(javax.swing.BorderFactory.createTitledBorder("ALU"));

        jLabel36.setText("Operando1");

        jLabel38.setText("Operando2");

        jLabel39.setText("Alu Result");

        jLabel40.setText("Operação");

        jLabelOp1.setBackground(new java.awt.Color(255, 255, 51));
        jLabelOp1.setText("00");
        jLabelOp1.setOpaque(true);

        jLabelOp2.setBackground(new java.awt.Color(255, 255, 51));
        jLabelOp2.setText("00");
        jLabelOp2.setOpaque(true);

        jLabelOperation.setBackground(new java.awt.Color(255, 255, 51));
        jLabelOperation.setText("00");
        jLabelOperation.setOpaque(true);

        jLabelAluResult.setBackground(new java.awt.Color(255, 255, 51));
        jLabelAluResult.setText("00");
        jLabelAluResult.setOpaque(true);

        javax.swing.GroupLayout jPanelAluLayout = new javax.swing.GroupLayout(jPanelAlu);
        jPanelAlu.setLayout(jPanelAluLayout);
        jPanelAluLayout.setHorizontalGroup(
            jPanelAluLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanelAluLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanelAluLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanelAluLayout.createSequentialGroup()
                        .addComponent(jLabel36)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(jLabelOp1, javax.swing.GroupLayout.PREFERRED_SIZE, 17, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(jPanelAluLayout.createSequentialGroup()
                        .addComponent(jLabel39)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(jLabelAluResult, javax.swing.GroupLayout.PREFERRED_SIZE, 17, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(jPanelAluLayout.createSequentialGroup()
                        .addComponent(jLabel38)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(jLabelOp2, javax.swing.GroupLayout.PREFERRED_SIZE, 17, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(jPanelAluLayout.createSequentialGroup()
                        .addComponent(jLabel40)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(jLabelOperation, javax.swing.GroupLayout.PREFERRED_SIZE, 17, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addContainerGap())
        );
        jPanelAluLayout.setVerticalGroup(
            jPanelAluLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanelAluLayout.createSequentialGroup()
                .addContainerGap(12, Short.MAX_VALUE)
                .addGroup(jPanelAluLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel36)
                    .addComponent(jLabelOp1))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanelAluLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel38)
                    .addComponent(jLabelOp2))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanelAluLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel40)
                    .addComponent(jLabelOperation))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanelAluLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel39)
                    .addComponent(jLabelAluResult)))
        );

        jPanel1.setBorder(javax.swing.BorderFactory.createTitledBorder("PC"));

        jLabel21.setText("PC");

        jLabelPc.setBackground(new java.awt.Color(255, 255, 51));
        jLabelPc.setText("00");
        jLabelPc.setOpaque(true);

        javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
        jPanel1.setLayout(jPanel1Layout);
        jPanel1Layout.setHorizontalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jLabel21)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 155, Short.MAX_VALUE)
                .addComponent(jLabelPc, javax.swing.GroupLayout.PREFERRED_SIZE, 17, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap())
        );
        jPanel1Layout.setVerticalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel21)
                    .addComponent(jLabelPc))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        javax.swing.GroupLayout jPanelInfoLayout = new javax.swing.GroupLayout(jPanelInfo);
        jPanelInfo.setLayout(jPanelInfoLayout);
        jPanelInfoLayout.setHorizontalGroup(
            jPanelInfoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanelInfoLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jPanelSignalControl, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanelInfoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                    .addComponent(jPanelMemoryRead, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jPanelAlu, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jPanelReg, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(4, 4, 4)
                .addGroup(jPanelInfoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jPanelRegister, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanelInfoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jPanelTypeInst, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jPanelInst, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
        );
        jPanelInfoLayout.setVerticalGroup(
            jPanelInfoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanelInfoLayout.createSequentialGroup()
                .addGroup(jPanelInfoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(jPanelSignalControl, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addGroup(jPanelInfoLayout.createSequentialGroup()
                        .addComponent(jPanelReg, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jPanelMemoryRead, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jPanelAlu, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addContainerGap())
            .addGroup(jPanelInfoLayout.createSequentialGroup()
                .addGroup(jPanelInfoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addGroup(jPanelInfoLayout.createSequentialGroup()
                        .addComponent(jPanelTypeInst, javax.swing.GroupLayout.PREFERRED_SIZE, 270, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jPanelInst, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                    .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanelInfoLayout.createSequentialGroup()
                        .addComponent(jPanelRegister, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, 53, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addGap(0, 6, Short.MAX_VALUE))
        );

        jTabbedPaneInfo.addTab("Informações", jPanelInfo);

        jToolBar1.setBorder(javax.swing.BorderFactory.createEtchedBorder());
        jToolBar1.setOrientation(javax.swing.SwingConstants.VERTICAL);
        jToolBar1.setRollover(true);

        lbOpen.setIcon(new javax.swing.ImageIcon(getClass().getResource("/br/unioeste/cc/gui/open.png"))); // NOI18N
        lbOpen.setToolTipText("próxima instrução");
        lbOpen.setBorder(javax.swing.BorderFactory.createEtchedBorder());
        lbOpen.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                lbOpenMouseClicked(evt);
            }
        });
        jToolBar1.add(lbOpen);
        jToolBar1.add(jSeparator1);

        lbNext.setIcon(new javax.swing.ImageIcon(getClass().getResource("/br/unioeste/cc/gui/go.png"))); // NOI18N
        lbNext.setToolTipText("próxima instrução");
        lbNext.setBorder(javax.swing.BorderFactory.createEtchedBorder());
        lbNext.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                lbNextMouseClicked(evt);
            }
        });
        jToolBar1.add(lbNext);
        jToolBar1.add(jSeparator18);

        lbExit.setIcon(new javax.swing.ImageIcon(getClass().getResource("/br/unioeste/cc/gui/cancel.png"))); // NOI18N
        lbExit.setToolTipText("sair");
        lbExit.setBorder(javax.swing.BorderFactory.createEtchedBorder());
        lbExit.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                lbExitMouseClicked(evt);
            }
        });
        jToolBar1.add(lbExit);

        jMenu1.setText("Arquivo");

        jMenuItemOpenFile.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_O, java.awt.event.InputEvent.CTRL_MASK));
        jMenuItemOpenFile.setIcon(new javax.swing.ImageIcon(getClass().getResource("/br/unioeste/cc/gui/open.png"))); // NOI18N
        jMenuItemOpenFile.setText("Abrir arquivo...");
        jMenuItemOpenFile.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItemOpenFileActionPerformed(evt);
            }
        });
        jMenu1.add(jMenuItemOpenFile);

        jMenuBar1.add(jMenu1);

        jMenu2.setText("Editar");
        jMenuBar1.add(jMenu2);

        jMenu3.setText("Sobre");
        jMenuBar1.add(jMenu3);

        setJMenuBar(jMenuBar1);

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addComponent(jToolBar1, javax.swing.GroupLayout.PREFERRED_SIZE, 44, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jTabbedPaneInfo, javax.swing.GroupLayout.DEFAULT_SIZE, 940, Short.MAX_VALUE)
                .addContainerGap())
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jTabbedPaneInfo, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
            .addComponent(jToolBar1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void lbExitMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_lbExitMouseClicked
        System.exit(0);
    }//GEN-LAST:event_lbExitMouseClicked
    // objeto responsável pelo Adder
    Adder adder = new Adder();
    // objeto responsável pela alu
    Alu alu = new Alu();
    // objetyo responsável pelo alu control
    AluControl aluControl = new AluControl();
    // objeto responsável pela memory instrction
    MemoryInstruction memoryInstruction;
    // objeto responsável pelo mux do registrador
    Mux muxRegister = new Mux();
    // objeto responsavel pelo mux da alu
    Mux muxAlu = new Mux();
    // objeto responsável mux da data
    Mux muxData = new Mux();
    // objeto responsável pelo  mux do pc
    Mux muxPc = new Mux();
    // objeto responsável pelo mux da lui
    Mux muxLui = new Mux();
    // objeto responsável pelo mux do jump
    Mux muxJump = new Mux();
    // objeto responsável pelo mux do jr
    Mux muxJumpJr = new Mux();
    // objeto responsável pelo mux do memtoreg
    Mux muxMemToReg = new Mux();
    // objeto responsável pelo mux bne
    Mux muxBne= new Mux();
    // objeto pelo pc
    Pc pc = new Pc();
    //objeto responsável pelo banco de registradores
    Registers registers = new Registers();
    // objeto responsável pela unit control
    UnitControl unitControl = new UnitControl();
    // contador
    int i = 0;
    // lista de instruções
    ArrayList<String> instructions = new ArrayList<String>();
    String path;
    /**
     * metódo responsável pelo sign extend
     * pré-condição: receber uma instrução de 16 bits
     * pós-condição: retornar uma instruçao para 32 bits 
     * 
     */
    private int signeExtend(int signe) {
        int sinalAux;

        sinalAux = signe << 16;
        sinalAux = sinalAux >> 16;

        return sinalAux;
    }
    
    private void executeR() {
        if (i < memoryInstruction.getMemoryRead().size()) {
            memoryInstruction.searchInstruction();
            //TODO passar vetor de instrucoes e registradores 
            jTableRegister.setModel(new javax.swing.table.DefaultTableModel(
                    //teste
                    new Object[][]{
                        {" 2",},
                        {" 3", null},
                        {" 5", null},
                        {" 431", null},
                        {" 431", null},
                        {" 41", null},
                        {" 15454", null},
                        {" 312", null},
                        {" 2345", null},
                        {null, null},
                        {null, null},
                        {null, null},
                        {null, null},
                        {null, null},
                        {null, null},
                        {null, null},
                        {null, null},
                        {null, null},
                        {null, null},
                        {null, null},
                        {null, null},
                        {null, null},
                        {null, null},
                        {null, null},
                        {null, null},
                        {null, null},
                        {null, null},
                        {null, null},
                        {null, null},
                        {null, null},
                        {null, null},
                        {null, null}
                    },
                    new String[]{
                        "Reg", "Conteúdo"
                    }));
            //obetem os valores dos registradores        
            registers.getContents();
            //  System.out.println("Busca Instrução: " + memoryInstruction.getInst());
            //obetem o valor da memory instruction de read 
            instructions = memoryInstruction.getMemoryRead();
            // atribui o valor de pc no label pc
            jLabelPc.setText(String.valueOf(pc.getAdress()));
            //atribui o valor para o label pc
            lbPc.setText(String.valueOf(pc.getAdress()));
            // incrementa pc
            pc.incPc();
            //contador 
            i++;
            // atribui o valor do endereço de pc
            memoryInstruction.setPc(pc.getAdress());
            //executa o método intruction type
            memoryInstruction.instructionType();
            //atribui o valor do endereço para label da memory instruction
            lbInstruction.setText(String.valueOf(memoryInstruction.getInst()));
            //atribui o valor no label do opcode 
            jTextFieldOpcodeR.setText(String.valueOf(memoryInstruction.getOpcode()));
            //atribui o valor no label do opcode
            lbOpcode.setText(String.valueOf(memoryInstruction.getOpcode()));
            //atribui o valor para o label rs
            jTextFieldRsR.setText(String.valueOf(memoryInstruction.getRs()));
            // atribui o valor pra label rs 
            lbRs.setText(String.valueOf(memoryInstruction.getRs()));
            // atribui o valor pra o label rt
            jTextFieldRtR.setText(String.valueOf(memoryInstruction.getRt()));
            // atribui o valor para o label do rt 
            lbRt.setText(String.valueOf(memoryInstruction.getRt()));
            // atribui o valor pra o label rd
            jTextFieldRdR.setText(String.valueOf(memoryInstruction.getRd()));
            //atribui o valor para o label do rd
            lbRd.setText(String.valueOf(memoryInstruction.getRd()));
            //atribui o valor pra o label do shamt
            jTextFieldShamt.setText(String.valueOf(memoryInstruction.getShamt()));
            // atribui o valor par o label funct 
            jTextFieldFunct.setText(String.valueOf(memoryInstruction.getFunct()));
            // atribui o valor pra o label funct 
            lbFunct.setText(String.valueOf(memoryInstruction.getFunct()));
            // atribui o valor do opcode para a unit control 
            unitControl.setOpCode(memoryInstruction.getOpcode());
            // atribui o valor para a funct 
            unitControl.setFunct(memoryInstruction.getFunct());
            //executa o método sinal control
            unitControl.signalControl();
            // atribui o valor para o label do regdst
            jLabelRegDst.setText(String.valueOf(unitControl.getRegDst()));
            // atribui o valor para o label do regdst
            lbSignalRegDst.setText(String.valueOf(unitControl.getRegDst()));
            // atribui o valor para label do aluop
            jLabelAluOp.setText(String.valueOf(unitControl.getAluOp()));
            // atribui o valor para o label aluop
            lbSignalAluOp.setText(String.valueOf(unitControl.getAluOp()));
            // atribui o valor para o label alusrc
            jLabelAluSrc.setText(String.valueOf(unitControl.getAluSrc()));
            //atribui o valor para o label alusrc
            lbSignalAluSrc.setText(String.valueOf(unitControl.getAluSrc()));
            //atribui o valor para o label do branch
            jLabelBranch.setText(String.valueOf(unitControl.getBranch()));
            // atribui o valor para o label branch
            lbSignalBranch.setText(String.valueOf(unitControl.getBranch()));
            //atribui o valor para o label mentored
            jLabelMemRead.setText(String.valueOf(unitControl.getMemRead()));
            // atribui o valor para o label memread
            lbSignalMemRead.setText(String.valueOf(unitControl.getMemRead()));
            //atribui o valor para o label mentoreg
            jLabelMemToReg.setText(String.valueOf(unitControl.getMemToReg()));
            //atribui o valor para o label memtoreg
            lbSignalMemToReg.setText(String.valueOf(unitControl.getMemToReg()));
            //atribui o valor para o label regwrite
            jLabelRegWrite.setText(String.valueOf(unitControl.getRegWrite()));
            //atribui o valor para a label regwrite
            lbSignalRegWrite.setText(String.valueOf(unitControl.getRegWrite()));

            // atribui ovalor do regdsr para o mux do register
            muxRegister.setSignal(unitControl.getRegDst());

            //System.out.println("\n" + "Signal MuxResgiter = " + muxRegister.getSignal());
            //atribui o valor do rt para o valor 0 do mux
            muxRegister.setInput0(memoryInstruction.getRt());
            //System.out.println("Input0 MuxResgiter = " + muxRegister.getInput0());
            //atribui o valor do rd para o 1 do mux register
            muxRegister.setInput1(memoryInstruction.getRd());
            // System.out.println("Input1 MuxResgiter = " + muxRegister.getInput1());
            //executa a funçao de saido do mux do register
            muxRegister.selectOutput();
            // atribui o valor para o label muxregister
            lbWriteReg.setText(String.valueOf(muxRegister.getOutput()));
            //atribui o valor para o label do mux register 
            jLabelWriteReg.setText(String.valueOf(muxRegister.getOutput()));

            // System.out.println("Output MuxRegister = " + muxRegister.getOutput() + "\n");
            //executa a funçao creatContents
            registers.createContents();
            //atribui o valor para o readreg1 do rs
            registers.setReadReg1(memoryInstruction.getRs());
            // atribui o valor para p label do reafreg1
            jLabelReadReg1.setText(String.valueOf(registers.getReadReg1()));
            //System.out.println("readRegister1 = " + registers.getReadReg1());
            
            registers.setReadReg2(memoryInstruction.getRt());
            jLabelReadReg2.setText(String.valueOf(registers.getReadReg2()));
            //System.out.println("readRegister2 = " + registers.getReadReg2());
            registers.setWriteReg(muxRegister.getOutput());
            jLabelWriteReg.setText(String.valueOf(muxRegister.getOutput()));
            //System.out.println("Write Reg = " + registers.getWriteReg());
            //registers.setReadData1(5);
            registers.getContents().add(8, 5);
            registers.getContents().add(9, 3);

            // System.out.println(registers.getContents());

            registers.setReadData1(registers.getContents().get(registers.getReadReg1()));
            jLabelReadData1.setText(String.valueOf(registers.getReadData1()));
            //System.out.println("ReadData1 = " + registers.getReadData1());
            //registers.setReadData2(3);
            registers.setReadData2(registers.getContents().get(registers.getReadReg2()));
            jLabelReadData2.setText(String.valueOf(registers.getReadData2()));
            //System.out.println("ReadData2 = " + registers.getReadData2() + "\n");

            aluControl.setAluOp(unitControl.getAluOp());
            jLabelAluOp.setText(String.valueOf(aluControl.getAluOp()));
            //System.out.println("Aluop = " + aluControl.getAluOp());
            aluControl.setFunct(memoryInstruction.getFunct());
            jTextFieldFunct.setText(String.valueOf(aluControl.getFunct()));
            //System.out.println("Funct = " + aluControl.getFunct());
            aluControl.generateOutput();
            jLabelOperation.setText(String.valueOf(aluControl.getOutput()));
            lbSignalAluControl.setText(String.valueOf(aluControl.getOutput()));
            //System.out.println("Output = " + aluControl.getOutput() + "\n");

            muxAlu.setSignal(unitControl.getAluSrc());
            //System.out.println("AluSrc = " + muxAlu.getSignal() + "\n");
            muxAlu.setInput0(registers.getReadData2());
            //muxAlu.setInput1([15-0]); //nao utilizado ainda... somente ira utilizar se for uma LW ou SW
            muxAlu.selectOutput();
            jLabelOp2.setText(String.valueOf(muxAlu.getOutput()));

            alu.setOp1(registers.getReadData1());
            jLabelOp1.setText(String.valueOf(registers.getReadData1()));

            //System.out.println("Op1 = " + alu.getOp1());
            alu.setOp2(muxAlu.getOutput());
            jLabelOp2.setText(String.valueOf(muxAlu.getOutput()));

            //System.out.println("Op2 = " + alu.getOp2());
            alu.setSignalAluControl(aluControl.getOutput());

            alu.execute();

            registers.setWriteData(alu.getResult());
            jLabelAluResult.setText(String.valueOf(alu.getResult()));

            jLabelWriteData.setText(String.valueOf(registers.getWriteData()));
            lbWriteData.setText(String.valueOf(String.valueOf(registers.getWriteData())));

            System.out.println("Alu result = " + alu.getResult());

        } else {
            JOptionPane.showMessageDialog(null, "Nào há mais instruções para ser executadas!");
        }
    }
    
    private void executeI() {
        if (i < memoryInstruction.getMemoryRead().size()) {
            memoryInstruction.searchInstruction();
            //TODO passar vetor de instrucoes e registradores 
            registers.getContents();
            //  System.out.println("Busca Instrução: " + memoryInstruction.getInst());
            instructions = memoryInstruction.getMemoryRead();

            jLabelPc.setText(String.valueOf(pc.getAdress()));
            lbPc.setText(String.valueOf(pc.getAdress()));

            pc.incPc();
            i++;

            memoryInstruction.setPc(pc.getAdress());
            memoryInstruction.instructionType();

            lbInstruction.setText(String.valueOf(memoryInstruction.getInst()));

            jTextFieldOpcodeR.setText(String.valueOf(memoryInstruction.getOpcode()));
            lbOpcode.setText(String.valueOf(memoryInstruction.getOpcode()));

            /*-------------------------------------------------------------------*/
            
            muxLui.setInput0(muxAlu.getOutput());
            
            muxLui.setInput1((memoryInstruction.getConstante()<<4));     
            
            
            
            jTextFieldRsR.setText(String.valueOf(memoryInstruction.getRs()));
            lbRs.setText(String.valueOf(memoryInstruction.getRs()));

            jTextFieldRtR.setText(String.valueOf(memoryInstruction.getRt()));
            lbRt.setText(String.valueOf(memoryInstruction.getRt()));

            jTextFieldRdR.setText(String.valueOf(memoryInstruction.getRd()));
            lbRd.setText(String.valueOf(memoryInstruction.getRd()));

            jTextFieldShamt.setText(String.valueOf(memoryInstruction.getShamt()));

            jTextFieldFunct.setText(String.valueOf(memoryInstruction.getFunct()));
            lbFunct.setText(String.valueOf(memoryInstruction.getFunct()));

            unitControl.setOpCode(memoryInstruction.getOpcode());
            unitControl.setFunct(memoryInstruction.getFunct());
            
            unitControl.signalControl();
            //sinais de controle
            jLabelRegDst.setText(String.valueOf(unitControl.getRegDst()));
            lbSignalRegDst.setText(String.valueOf(unitControl.getRegDst()));
            jLabelAluOp.setText(String.valueOf(unitControl.getAluOp()));
            lbSignalAluOp.setText(String.valueOf(unitControl.getAluOp()));
            jLabelAluSrc.setText(String.valueOf(unitControl.getAluSrc()));
            lbSignalAluSrc.setText(String.valueOf(unitControl.getAluSrc()));
            jLabelBranch.setText(String.valueOf(unitControl.getBranch()));
            lbSignalBranch.setText(String.valueOf(unitControl.getBranch()));
            jLabelMemRead.setText(String.valueOf(unitControl.getMemRead()));
            lbSignalMemRead.setText(String.valueOf(unitControl.getMemRead()));
            jLabelMemToReg.setText(String.valueOf(unitControl.getMemToReg()));
            lbSignalMemToReg.setText(String.valueOf(unitControl.getMemToReg()));
            jLabelRegWrite.setText(String.valueOf(unitControl.getRegWrite()));
            lbSignalRegWrite.setText(String.valueOf(unitControl.getRegWrite()));
           
            muxRegister.setSignal(unitControl.getRegDst());

            //System.out.println("\n" + "Signal MuxResgiter = " + muxRegister.getSignal());

            muxRegister.setInput0(memoryInstruction.getRt());
            //System.out.println("Input0 MuxResgiter = " + muxRegister.getInput0());
            muxRegister.setInput1(memoryInstruction.getRd());
            // System.out.println("Input1 MuxResgiter = " + muxRegister.getInput1());
            muxRegister.selectOutput();
            lbWriteReg.setText(String.valueOf(muxRegister.getOutput()));
            jLabelWriteReg.setText(String.valueOf(muxRegister.getOutput()));

            // System.out.println("Output MuxRegister = " + muxRegister.getOutput() + "\n");

            registers.createContents();
            registers.setReadReg1(memoryInstruction.getRs());
            jLabelReadReg1.setText(String.valueOf(registers.getReadReg1()));

            //System.out.println("readRegister1 = " + registers.getReadReg1());
            registers.setReadReg2(memoryInstruction.getRt());
            jLabelReadReg2.setText(String.valueOf(registers.getReadReg2()));
            //System.out.println("readRegister2 = " + registers.getReadReg2());
            
            registers.setWriteData(muxLui.getOutput());
            
            registers.setWriteReg(muxRegister.getOutput());
            jLabelWriteReg.setText(String.valueOf(muxRegister.getOutput()));
            //System.out.println("Write Reg = " + registers.getWriteReg());
            //registers.setReadData1(5);
            registers.getContents().add(8, 5);
            registers.getContents().add(9, 3);

            // System.out.println(registers.getContents());

            registers.setReadData1(registers.getContents().get(registers.getReadReg1()));
            jLabelReadData1.setText(String.valueOf(registers.getReadData1()));
            //System.out.println("ReadData1 = " + registers.getReadData1());
            //registers.setReadData2(3);
            registers.setReadData2(registers.getContents().get(registers.getReadReg2()));
            jLabelReadData2.setText(String.valueOf(registers.getReadData2()));
            //System.out.println("ReadData2 = " + registers.getReadData2() + "\n");

            aluControl.setAluOp(unitControl.getAluOp());
            jLabelAluOp.setText(String.valueOf(aluControl.getAluOp()));
            //System.out.println("Aluop = " + aluControl.getAluOp());
            aluControl.setFunct(memoryInstruction.getFunct());
            jTextFieldFunct.setText(String.valueOf(aluControl.getFunct()));
            //System.out.println("Funct = " + aluControl.getFunct());
            aluControl.generateOutput();
            jLabelOperation.setText(String.valueOf(aluControl.getOutput()));
            lbSignalAluControl.setText(String.valueOf(aluControl.getOutput()));
            //System.out.println("Output = " + aluControl.getOutput() + "\n");

            muxAlu.setSignal(unitControl.getAluSrc());
            //System.out.println("AluSrc = " + muxAlu.getSignal() + "\n");
            muxAlu.setInput0(registers.getReadData2());
            //muxAlu.setInput1([15-0]); //nao utilizado ainda... somente ira utilizar se for uma LW ou SW
            muxAlu.selectOutput();
            jLabelOp2.setText(String.valueOf(muxAlu.getOutput()));

            alu.setOp1(registers.getReadData1());
            jLabelOp1.setText(String.valueOf(registers.getReadData1()));

            //System.out.println("Op1 = " + alu.getOp1());
            alu.setOp2(muxAlu.getOutput());
            jLabelOp2.setText(String.valueOf(muxAlu.getOutput()));

            //System.out.println("Op2 = " + alu.getOp2());
            alu.setSignalAluControl(aluControl.getOutput());

            alu.execute();

            //registers.setWriteData(alu.getResult());
            jLabelAluResult.setText(String.valueOf(alu.getResult()));
            
            if ((unitControl.getBne() & alu.getZero())==0){
                      muxBne.setInput0(muxPc.getOutput());
            }else{
                      if((unitControl.getBne() & alu.getZero())==1){
                      muxBne.setInput1(alu.getResult());
            }}
            pc.setAdress(muxBne.getOutput());
            jLabelWriteData.setText(String.valueOf(registers.getWriteData()));
            lbWriteData.setText(String.valueOf(String.valueOf(registers.getWriteData())));
            
            
           // System.out.println("Alu result = " + alu.getResult());

        } else {
            JOptionPane.showMessageDialog(null, "Nào há mais instruções para ser executadas!");
        }
    }
    private void executeJ() {
        if (i < memoryInstruction.getMemoryRead().size()) {
            memoryInstruction.searchInstruction();
            //TODO passar vetor de instrucoes e registradores 
            registers.getContents();
            //  System.out.println("Busca Instrução: " + memoryInstruction.getInst());
            instructions = memoryInstruction.getMemoryRead();

            jLabelPc.setText(String.valueOf(pc.getAdress()));
            lbPc.setText(String.valueOf(pc.getAdress()));

            pc.incPc();
            i++;

            memoryInstruction.setPc(pc.getAdress());
            memoryInstruction.instructionType();

            lbInstruction.setText(String.valueOf(memoryInstruction.getInst()));

            jTextFieldOpcodeR.setText(String.valueOf(memoryInstruction.getOpcode()));
            lbOpcode.setText(String.valueOf(memoryInstruction.getOpcode()));

            /*-------------------------------------------------------------------*/
            
            jTextFieldRsR.setText(String.valueOf(memoryInstruction.getRs()));
            lbRs.setText(String.valueOf(memoryInstruction.getRs()));

            jTextFieldRtR.setText(String.valueOf(memoryInstruction.getRt()));
            lbRt.setText(String.valueOf(memoryInstruction.getRt()));

            jTextFieldRdR.setText(String.valueOf(memoryInstruction.getRd()));
            lbRd.setText(String.valueOf(memoryInstruction.getRd()));

            jTextFieldShamt.setText(String.valueOf(memoryInstruction.getShamt()));

            jTextFieldFunct.setText(String.valueOf(memoryInstruction.getFunct()));
            lbFunct.setText(String.valueOf(memoryInstruction.getFunct()));

            unitControl.setOpCode(memoryInstruction.getOpcode());
            unitControl.setFunct(memoryInstruction.getFunct());
            
            unitControl.signalControl();
            //sinais de controle
            jLabelRegDst.setText(String.valueOf(unitControl.getRegDst()));
            lbSignalRegDst.setText(String.valueOf(unitControl.getRegDst()));
            jLabelAluOp.setText(String.valueOf(unitControl.getAluOp()));
            lbSignalAluOp.setText(String.valueOf(unitControl.getAluOp()));
            jLabelAluSrc.setText(String.valueOf(unitControl.getAluSrc()));
            lbSignalAluSrc.setText(String.valueOf(unitControl.getAluSrc()));
            jLabelBranch.setText(String.valueOf(unitControl.getBranch()));
            lbSignalBranch.setText(String.valueOf(unitControl.getBranch()));
            jLabelMemRead.setText(String.valueOf(unitControl.getMemRead()));
            lbSignalMemRead.setText(String.valueOf(unitControl.getMemRead()));
            jLabelMemToReg.setText(String.valueOf(unitControl.getMemToReg()));
            lbSignalMemToReg.setText(String.valueOf(unitControl.getMemToReg()));
            jLabelRegWrite.setText(String.valueOf(unitControl.getRegWrite()));
            lbSignalRegWrite.setText(String.valueOf(unitControl.getRegWrite()));

            muxRegister.setSignal(unitControl.getRegDst());

            //System.out.println("\n" + "Signal MuxResgiter = " + muxRegister.getSignal());

            muxRegister.setInput0(memoryInstruction.getRt());
            //System.out.println("Input0 MuxResgiter = " + muxRegister.getInput0());
            muxRegister.setInput1(memoryInstruction.getRd());
            // System.out.println("Input1 MuxResgiter = " + muxRegister.getInput1());
            muxRegister.selectOutput();
            lbWriteReg.setText(String.valueOf(muxRegister.getOutput()));
            jLabelWriteReg.setText(String.valueOf(muxRegister.getOutput()));

            // System.out.println("Output MuxRegister = " + muxRegister.getOutput() + "\n");

            registers.createContents();
            registers.setReadReg1(memoryInstruction.getRs());
            jLabelReadReg1.setText(String.valueOf(registers.getReadReg1()));

            //System.out.println("readRegister1 = " + registers.getReadReg1());
            registers.setReadReg2(memoryInstruction.getRt());
            jLabelReadReg2.setText(String.valueOf(registers.getReadReg2()));
            //System.out.println("readRegister2 = " + registers.getReadReg2());
            registers.setWriteReg(muxRegister.getOutput());
            jLabelWriteReg.setText(String.valueOf(muxRegister.getOutput()));
            //System.out.println("Write Reg = " + registers.getWriteReg());
            //registers.setReadData1(5);
            registers.getContents().add(8, 5);
            registers.getContents().add(9, 3);

            // System.out.println(registers.getContents());

            registers.setReadData1(registers.getContents().get(registers.getReadReg1()));
            jLabelReadData1.setText(String.valueOf(registers.getReadData1()));
            //System.out.println("ReadData1 = " + registers.getReadData1());
            //registers.setReadData2(3);
            registers.setReadData2(registers.getContents().get(registers.getReadReg2()));
            jLabelReadData2.setText(String.valueOf(registers.getReadData2()));
            //System.out.println("ReadData2 = " + registers.getReadData2() + "\n");

            aluControl.setAluOp(unitControl.getAluOp());
            jLabelAluOp.setText(String.valueOf(aluControl.getAluOp()));
            //System.out.println("Aluop = " + aluControl.getAluOp());
            aluControl.setFunct(memoryInstruction.getFunct());
            jTextFieldFunct.setText(String.valueOf(aluControl.getFunct()));
            //System.out.println("Funct = " + aluControl.getFunct());
            aluControl.generateOutput();
            jLabelOperation.setText(String.valueOf(aluControl.getOutput()));
            lbSignalAluControl.setText(String.valueOf(aluControl.getOutput()));
            //System.out.println("Output = " + aluControl.getOutput() + "\n");

            muxAlu.setSignal(unitControl.getAluSrc());
            //System.out.println("AluSrc = " + muxAlu.getSignal() + "\n");
            muxAlu.setInput0(registers.getReadData2());
            //muxAlu.setInput1([15-0]); //nao utilizado ainda... somente ira utilizar se for uma LW ou SW
            muxAlu.selectOutput();
            jLabelOp2.setText(String.valueOf(muxAlu.getOutput()));

            alu.setOp1(registers.getReadData1());
            jLabelOp1.setText(String.valueOf(registers.getReadData1()));

            //System.out.println("Op1 = " + alu.getOp1());
            alu.setOp2(muxAlu.getOutput());
            jLabelOp2.setText(String.valueOf(muxAlu.getOutput()));

            //System.out.println("Op2 = " + alu.getOp2());
            alu.setSignalAluControl(aluControl.getOutput());

            alu.execute();

            registers.setWriteData(alu.getResult());
            jLabelAluResult.setText(String.valueOf(alu.getResult()));

            jLabelWriteData.setText(String.valueOf(registers.getWriteData()));
            lbWriteData.setText(String.valueOf(String.valueOf(registers.getWriteData())));
            
            muxJumpJr.setInput1(registers.getReadData1());
            
            muxJumpJr.setInput0(muxPc.getOutput());
            
            pc.setAdress(muxJumpJr.getOutput());
          
            System.out.println("Alu result = " + alu.getResult());

        } else {
            JOptionPane.showMessageDialog(null, "Nào há mais instruções para ser executadas!");
        }
    }
    
    
    private void lbNextMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_lbNextMouseClicked
        if (path != null) {//verifica se já foi carregado o arquivo
            if (memoryInstruction.getOpcode() == 0) { //tipo R
                executeR();
            } else if (memoryInstruction.getOpcode() == 2) { //Jump
                executeJ();
            } else if(memoryInstruction.getOpcode()== 4) {//tipo I
                executeI();
            }
        } else {
            JOptionPane.showMessageDialog(null, "Selecione o arquivo com as instruções!");
        }
    }//GEN-LAST:event_lbNextMouseClicked

    private void openFile() {
        JFileChooser fc = new JFileChooser();
        fc.setFileSelectionMode(JFileChooser.FILES_ONLY);

        int res = fc.showOpenDialog(null);

        if (res == JFileChooser.APPROVE_OPTION) {
            File arquivo = fc.getSelectedFile();
            JOptionPane.showMessageDialog(null, "Voce escolheu o arquivo: " + arquivo.getName() + " localizado em: " + arquivo.getPath());
            path = arquivo.getPath();
            memoryInstruction = new MemoryInstruction(path);
            pc.setAdress(0);
            i = 0;
        } else {
            JOptionPane.showMessageDialog(null, "Voce não selecionou nenhum arquivo.");
        }
    }

    private void jMenuItemOpenFileActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItemOpenFileActionPerformed
        openFile();
    }//GEN-LAST:event_jMenuItemOpenFileActionPerformed

    private void lbOpenMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_lbOpenMouseClicked
        openFile();
    }//GEN-LAST:event_lbOpenMouseClicked

    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
        /*
         * Set the Nimbus look and feel
         */
        //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
        /*
         * If Nimbus (introduced in Java SE 6) is not available, stay with the
         * default look and feel. For details see
         * http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html
         */
        try {
            for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
                if ("Windows".equals(info.getName())) {
                    javax.swing.UIManager.setLookAndFeel(info.getClassName());
                    break;
                }
            }
        } catch (ClassNotFoundException ex) {
            java.util.logging.Logger.getLogger(VirtualMachineGUI.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (InstantiationException ex) {
            java.util.logging.Logger.getLogger(VirtualMachineGUI.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (IllegalAccessException ex) {
            java.util.logging.Logger.getLogger(VirtualMachineGUI.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (javax.swing.UnsupportedLookAndFeelException ex) {
            java.util.logging.Logger.getLogger(VirtualMachineGUI.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        }
        //</editor-fold>

        /*
         * Create and display the form
         */
        java.awt.EventQueue.invokeLater(new Runnable() {

            public void run() {
                new VirtualMachineGUI().setVisible(true);
            }
        });
    }
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel10;
    private javax.swing.JLabel jLabel11;
    private javax.swing.JLabel jLabel12;
    private javax.swing.JLabel jLabel13;
    private javax.swing.JLabel jLabel14;
    private javax.swing.JLabel jLabel15;
    private javax.swing.JLabel jLabel16;
    private javax.swing.JLabel jLabel17;
    private javax.swing.JLabel jLabel18;
    private javax.swing.JLabel jLabel19;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel20;
    private javax.swing.JLabel jLabel21;
    private javax.swing.JLabel jLabel24;
    private javax.swing.JLabel jLabel25;
    private javax.swing.JLabel jLabel26;
    private javax.swing.JLabel jLabel27;
    private javax.swing.JLabel jLabel28;
    private javax.swing.JLabel jLabel29;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel30;
    private javax.swing.JLabel jLabel31;
    private javax.swing.JLabel jLabel32;
    private javax.swing.JLabel jLabel33;
    private javax.swing.JLabel jLabel34;
    private javax.swing.JLabel jLabel35;
    private javax.swing.JLabel jLabel36;
    private javax.swing.JLabel jLabel38;
    private javax.swing.JLabel jLabel39;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JLabel jLabel40;
    private javax.swing.JLabel jLabel5;
    private javax.swing.JLabel jLabel6;
    private javax.swing.JLabel jLabel7;
    private javax.swing.JLabel jLabel8;
    private javax.swing.JLabel jLabel9;
    private javax.swing.JLabel jLabelAdress;
    private javax.swing.JLabel jLabelAluControl;
    private javax.swing.JLabel jLabelAluOp;
    private javax.swing.JLabel jLabelAluResult;
    private javax.swing.JLabel jLabelAluSrc;
    private javax.swing.JLabel jLabelBranch;
    private javax.swing.JLabel jLabelMemRead;
    private javax.swing.JLabel jLabelMemToReg;
    private javax.swing.JLabel jLabelMemWrite;
    private javax.swing.JLabel jLabelOp1;
    private javax.swing.JLabel jLabelOp2;
    private javax.swing.JLabel jLabelOperation;
    private javax.swing.JLabel jLabelPc;
    private javax.swing.JLabel jLabelPcSrc;
    private javax.swing.JLabel jLabelReadData;
    private javax.swing.JLabel jLabelReadData1;
    private javax.swing.JLabel jLabelReadData2;
    private javax.swing.JLabel jLabelReadReg1;
    private javax.swing.JLabel jLabelReadReg2;
    private javax.swing.JLabel jLabelRegDst;
    private javax.swing.JLabel jLabelRegWrite;
    private javax.swing.JLabel jLabelWriteData;
    private javax.swing.JLabel jLabelWriteDataMD;
    private javax.swing.JLabel jLabelWriteReg;
    private javax.swing.JLabel jLabelZero;
    private javax.swing.JMenu jMenu1;
    private javax.swing.JMenu jMenu2;
    private javax.swing.JMenu jMenu3;
    private javax.swing.JMenuBar jMenuBar1;
    private javax.swing.JMenuItem jMenuItemOpenFile;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JPanel jPanelAlu;
    private javax.swing.JPanel jPanelFormatI;
    private javax.swing.JPanel jPanelFormatJ;
    private javax.swing.JPanel jPanelFormatR;
    private javax.swing.JPanel jPanelInfo;
    private javax.swing.JPanel jPanelInst;
    private javax.swing.JPanel jPanelMemoryRead;
    private javax.swing.JPanel jPanelReg;
    private javax.swing.JPanel jPanelRegister;
    private javax.swing.JPanel jPanelSignalControl;
    private javax.swing.JPanel jPanelTypeInst;
    private javax.swing.JPanel jPanelViaDados;
    private javax.swing.JScrollPane jScrollPaneInst;
    private javax.swing.JScrollPane jScrollPaneRegister;
    private javax.swing.JToolBar.Separator jSeparator1;
    private javax.swing.JSeparator jSeparator15;
    private javax.swing.JSeparator jSeparator16;
    private javax.swing.JSeparator jSeparator17;
    private javax.swing.JToolBar.Separator jSeparator18;
    private javax.swing.JSeparator jSeparator2;
    private javax.swing.JSeparator jSeparator4;
    private javax.swing.JSeparator jSeparator5;
    private javax.swing.JSeparator jSeparator6;
    private javax.swing.JSeparator jSeparator7;
    private javax.swing.JSeparator jSeparator8;
    private javax.swing.JSeparator jSeparator9;
    private javax.swing.JTabbedPane jTabbedPaneInfo;
    private javax.swing.JTable jTableInst;
    private javax.swing.JTable jTableRegister;
    private javax.swing.JTextField jTextFieldAddressI;
    private javax.swing.JTextField jTextFieldAddressJ;
    private javax.swing.JTextField jTextFieldFunct;
    private javax.swing.JTextField jTextFieldOpcodeI;
    private javax.swing.JTextField jTextFieldOpcodeJ;
    private javax.swing.JTextField jTextFieldOpcodeR;
    private javax.swing.JTextField jTextFieldRdR;
    private javax.swing.JTextField jTextFieldRsI;
    private javax.swing.JTextField jTextFieldRsR;
    private javax.swing.JTextField jTextFieldRtI;
    private javax.swing.JTextField jTextFieldRtR;
    private javax.swing.JTextField jTextFieldShamt;
    private javax.swing.JToolBar jToolBar1;
    private javax.swing.JLabel lbAdder;
    private javax.swing.JLabel lbExit;
    private javax.swing.JLabel lbFunct;
    private javax.swing.JLabel lbIncPc;
    private javax.swing.JLabel lbInstruction;
    private javax.swing.JLabel lbNext;
    private javax.swing.JLabel lbOpcode;
    private javax.swing.JLabel lbOpen;
    private javax.swing.JLabel lbPc;
    private javax.swing.JLabel lbPcSrc;
    private javax.swing.JLabel lbRd;
    private javax.swing.JLabel lbResult;
    private javax.swing.JLabel lbRs;
    private javax.swing.JLabel lbRt;
    private javax.swing.JLabel lbSignalAluControl;
    private javax.swing.JLabel lbSignalAluOp;
    private javax.swing.JLabel lbSignalAluSrc;
    private javax.swing.JLabel lbSignalBranch;
    private javax.swing.JLabel lbSignalLui;
    private javax.swing.JLabel lbSignalMemRead;
    private javax.swing.JLabel lbSignalMemToReg;
    private javax.swing.JLabel lbSignalMemWrite;
    private javax.swing.JLabel lbSignalRegDst;
    private javax.swing.JLabel lbSignalRegWrite;
    private javax.swing.JLabel lbSinalAndbneorAndBranch;
    private javax.swing.JLabel lbSinalBne;
    private javax.swing.JLabel lbSinalBneAndZero;
    private javax.swing.JLabel lbSinalJump;
    private javax.swing.JLabel lbSinalJumpjr;
    private javax.swing.JLabel lbSinalZero;
    private javax.swing.JLabel lbWriteData;
    private javax.swing.JLabel lbWriteReg;
    private javax.swing.JLabel lbZero;
    private br.unioeste.cc.gui.PanelImagemFundo panelImagemFundo1;
    // End of variables declaration//GEN-END:variables
}
